package com.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author mornd
 * @date 2020/11/12 - 20:03
 */

/**
 * 页面跳转控制器
 */
@Controller
public class PageTransitController {
    //主页
    @RequestMapping("/toHome")
    public String toHomePage() {
        return "redirect:/home.jsp";
    }

    //获取主页主体部分
    @RequestMapping("/toMain")
    public String toMain() {
        return "redirect:/main.jsp";
    }

    //转至dept页面
    @RequestMapping("/toDeptList")
    @Secured({"ROLE_SUPERADMIN", "ROLE_ADMIN"})
    public String toDeptList() {
        return "department/deptManager";
    }

    //转至user页面
    @RequestMapping("/toUserList")
    @Secured({"ROLE_SUPERADMIN", "ROLE_ADMIN"})
    public String toUserList() {
        return "user/userManager";
    }

    //转至角色页面
    @RequestMapping("/toRoleList")
    @Secured({"ROLE_SUPERADMIN", "ROLE_ADMIN"})
    public String toRoleList() {
        return "role/roleManager";
    }

    //转至菜单页面
    @RequestMapping("/toPermission")
    @Secured({"ROLE_SUPERADMIN", "ROLE_ADMIN"})
    public String toPermission() {
        return "permission/permissionManager";
    }

    //转至楼层管理
    @RequestMapping("/toFloorList")
    public String toFloorList() {
        return "floor/floorManager";
    }

    //转至房型管理
    @RequestMapping("/toRoomType")
    public String toRoomTypeList() {
        return "roomType/roomTypeManager";
    }

    //转至房间管理页面
    @RequestMapping("/toRoomList")
    public String toRoomList() {
        return "room/roomManager";
    }

    //转至account管理页面
    @RequestMapping("/toAccountList")
    @Secured({"ROLE_SUPERADMIN", "ROLE_ADMIN"})
    public String toAccountList() {
        return "account/accountManager";
    }

    //转至系统日志管理页面
    @RequestMapping("/toSysLogList")
    @Secured({"ROLE_SUPERADMIN", "ROLE_ADMIN"})
    public String toSysLogList() {
        return "sysLog/sysLogManager";
    }

    //转至预定管理页面
    @RequestMapping("/toOrdersList")
    public String toOrdersList() {
        return "orders/ordersManager";
    }

    //转至入住管理页面
    @RequestMapping("/toCheckinList")
    public String toCheckinList() {
        return "checkin/checkinManager";
    }

    //转至退房管理页面
    @RequestMapping("/toCheckoutList")
    public String toCheckoutList() {
        return "checkout/checkoutManager";
    }

    //去到年度营业额报表统计分析页面
    @RequestMapping("/toYearTotalPriceManager")
    public String toYearTotalPriceManager() {
        return "charts/yearTotalPriceCharts";
    }

    //去到月营业额报表统计分析页面
    @RequestMapping("/toYearOfMonthManager")
    public String toYearOfMonthCharts() {
        return "charts/yearOfMonthCharts";
    }

    //去到季度营业额报表分析页面
    @RequestMapping("/toQuarterTotalPriceCharts")
    public String toQuarterTotalPriceCharts() {
        return "charts/quarterTotalPriceCharts";
    }

    //去到房型预定分析报表页面
    @RequestMapping("/toRoomTypePieCharts")
    public String toRoomTypePieCharts() {
        return "charts/roomTypePieCharts";
    }

    //去到当天入住报表页面
    @RequestMapping("/toCurrentCheckinCharts")
    public String toCurrentCheckinCharts() {
        return "charts/currentCheckinCharts";
    }
}
